
interface ip{
    age:number,
    sex:string
}

class Stu2{
    name:string ="李小明";
    constructor(name:string){
        this.name = name;
    }
}

class Cls2 extends Stu2 implements ip{
    age:number = 18;
    sex:string ='男';
    constructor(_name:string){
        super(_name);
    }
    log2(){
        console.log(this.name,this.age)
    }
}
let c2 = new Cls2("李明明");
c2.log2();